/**
 * Created by engoow on 16/8/2.
 */
var mongoose = require('mongoose');//引入mongoose库
mongoose.connect('mongodb://localhost:27017/demo');//mongodb连接地址,demo为数据库名称,默认mongodb连接不需要密码

var Schema = mongoose.Schema;//获取Schema,以便快捷使用
var ObjectId = Schema.Types.ObjectId;//获取ObjectId类型,以便快捷使用

exports.mongoose = mongoose; //导出mongoose
exports.Schema = Schema;//导出Schema
exports.ObjectId = ObjectId;//导出ObjectId
exports.Mixed = Schema.Types.Mixed;//导出Mixed
